//
//  JYNetworkTool.h
//  JYFarm
//
//  Created by 花花 on 2017/10/26.
//  Copyright © 2017年 花花. All rights reserved.
//

#import <Foundation/Foundation.h>
//请求成功回调
typedef void(^requestSuccessCallBack)(id resposeObject);
//请求失败回调
typedef void(^requestErrorCallBack)(NSError *error);

@interface JYNetworkTool : NSObject


//移除cookie
+ (void)removeCookie;
//保存cookie
+ (void)saveCookie;
//设置cookie
+ (void)setCookie;
//拼接地址
+(NSString *)InterfaceUrl:(NSString *)url;
//是否有网络
+ (BOOL)isNetworkAvailable;

/** @param urlString url地址
 *  @param parameter 参数
 *  @param success   成功回调
 *  @param failue    失败回调
 *
 */
/*POST请求*/
+ (LYRequestModel *)POST:(NSString *)urlString  parameter:(NSDictionary *)parameter  success:(requestSuccessCallBack)success failure:(requestErrorCallBack)failue;


@end
